package com.kuhyygy.service;

import android.app.IntentService;
import android.content.Intent;
import android.util.Log;

public class SimpleIntentService extends IntentService {

	private static final String TAG = "SimpleIntentService";

	public SimpleIntentService() {
		super("SimpleIntentService");
		Log.i(TAG, "create instance");
	}

	@Override
	protected void onHandleIntent(Intent arg0) {
		Log.i(TAG , "onStartCommand --> 线程ID:" + Thread.currentThread().getId());
		Log.i(TAG, "开始下载文件 ...");
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		Log.i(TAG, "文件下载完毕");
	}

	@Override
	public void onDestroy() {
		Log.i(TAG, "Destory!");
		super.onDestroy();
	}
	
	

}
